how remove -r-n from string in php

120

php remove newline -

//Replace the newline and carriage return characters
//using regex and preg_replace.
$text = preg_replace("/\r|\n/", "", $text);

Comments

Submit
0 Comments